/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "adm_tipo_consulta")
@NamedQueries({
    @NamedQuery(name = "AdmTipoConsulta.findAll", query = "SELECT a FROM AdmTipoConsulta a")})
public class AdmTipoConsulta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "atc_id")
    private Integer atcId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 64)
    @Column(name = "atc_nombre")
    private String atcNombre;
    @Basic(optional = false)
    @NotNull
    @Column(name = "atc_estado")
    private Integer atcEstado;
    @Size(max = 2147483647)
    @Column(name = "atc_descripcion")
    private String atcDescripcion;
    @ManyToMany(mappedBy = "admTipoConsultaList", fetch = FetchType.LAZY)
    private List<AdmMedico> admMedicoList;
    @OneToMany(mappedBy = "admTipoConsulta", fetch = FetchType.LAZY)
    private List<CexHorario> cexHorarioList;

    public AdmTipoConsulta() {
    }

    public AdmTipoConsulta(Integer atcId) {
        this.atcId = atcId;
    }

    public AdmTipoConsulta(Integer atcId, String atcNombre, Integer atcEstado) {
        this.atcId = atcId;
        this.atcNombre = atcNombre;
        this.atcEstado = atcEstado;
    }

    public Integer getAtcId() {
        return atcId;
    }

    public void setAtcId(Integer atcId) {
        this.atcId = atcId;
    }

    public String getAtcNombre() {
        return atcNombre;
    }

    public void setAtcNombre(String atcNombre) {
        this.atcNombre = atcNombre;
    }

    public Integer getAtcEstado() {
        return atcEstado;
    }

    public void setAtcEstado(Integer atcEstado) {
        this.atcEstado = atcEstado;
    }

    public String getAtcDescripcion() {
        return atcDescripcion;
    }

    public void setAtcDescripcion(String atcDescripcion) {
        this.atcDescripcion = atcDescripcion;
    }

    public List<AdmMedico> getAdmMedicoList() {
        return admMedicoList;
    }

    public void setAdmMedicoList(List<AdmMedico> admMedicoList) {
        this.admMedicoList = admMedicoList;
    }

    public List<CexHorario> getCexHorarioList() {
        return cexHorarioList;
    }

    public void setCexHorarioList(List<CexHorario> cexHorarioList) {
        this.cexHorarioList = cexHorarioList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (atcId != null ? atcId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AdmTipoConsulta)) {
            return false;
        }
        AdmTipoConsulta other = (AdmTipoConsulta) object;
        if ((this.atcId == null && other.atcId != null) || (this.atcId != null && !this.atcId.equals(other.atcId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.AdmTipoConsulta[ atcId=" + atcId + " ]";
    }
    
}
